﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tools;

namespace EntityModel
{
    /// <summary>
    /// 用户缴费
    /// </summary>
    [Table("D1")]
    public class UserPayment : EntityBase
    {
        /// <summary>
        /// 费用
        /// 学费：1
        /// 住宿费：2
        /// 学杂费：3
        /// </summary>
        [Column("D001")]
        [Required]
        public Cost Cost { get; set; }

        /// <summary>
        /// 应收金额
        /// </summary>
        [Column("D002")]
        [Required]
        public int AmountReceivable { get; set; }

        /// <summary>
        /// 实缴金额
        /// </summary>
        [Column("D003")]
        [Required]
        public int TotalAmount { get; set; }

        /// <summary>
        /// 待补缴金额
        /// </summary>
        [Column("D004")]
        [Required]
        public int Completion { get; set; }

        /// <summary>
        /// 支付方式
        /// </summary>
        [Column("D005")]
        [Required]
        [StringLength(20)]
        public string? PaymentMethod { get; set; }


        /// <summary>
        /// 缴费状态：1（已缴费）    2（未缴费）    3(存疑)
        /// </summary>
        [Column("D006")]
        [Required]
        public PaymentStatus PaymentStatus { get; set; }

        /// <summary>
        /// 收费负责人
        /// </summary>
        [Column("D007")]
        [StringLength(50)]
        [Required]
        public string? Supervisor { get; set; }

        /// <summary>
        /// 缴费用户
        /// </summary>
        [Required]
        public required EM_Students EM_Student { get; set; }
    }
}

